package com.youshang520i.dao;

import com.youshang520i.model.TeacherModel;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.sql.SQLIntegrityConstraintViolationException;
import java.util.List;

/**
 * @author youshang
 */
@Mapper
public interface TeacherDao {

    @Select("select * from teacher")
    List<TeacherModel> selectList();

    @Insert("insert teacher(tid,sid,tname) value(#{tid},#{sid},#{tname})")
    int insert(TeacherModel teacherModel);
}
